//
//  JAGAdRewardVideo.h
//  JAGatherAdDemo
//
//  Created by Yc on 2022/4/25.
//

#import "JAGAdBaseAdapter.h"

NS_ASSUME_NONNULL_BEGIN

@class JAGAdRewardVideo;

@protocol JAGAdRewardVideoDelegate <NSObject>

@optional

/// 激励视屏广告数据请求成功
- (void)JAGatherRewardVideoAdSuccessLoad:(JAGAdRewardVideo *)rewardVideo;

/// 激励视屏广告视频缓存完成 (为了更好的用户体验，建议此时显示视频广告)
- (void)JAGatherRewardVideoAdCacheFinish:(JAGAdRewardVideo *)rewardVideo;

/// 激励视屏广告数据请求失败
- (void)JAGatherRewardVideoAdFailLoad:(JAGAdRewardVideo *)rewardVideo error:(NSError *)error;

/// 激励视屏广告渲染失败
- (void)JAGatherRewardVideoAdRenderFailed:(JAGAdRewardVideo *)rewardVideo error:(NSError *)error;

/// 激励视屏广告曝光回调
- (void)JAGatherRewardVideoAdExposured:(JAGAdRewardVideo *)rewardVideo;

/// 激励视屏广告曝光失败
- (void)JAGatherRewardVideoAdExposuredFailed:(JAGAdRewardVideo *)rewardVideo error:(NSError *)error;

/// 激励视屏广告点击回调
- (void)JAGatherRewardVideoAdClicked:(JAGAdRewardVideo *)rewardVideo;

/// 激励视屏广告页关闭
- (void)JAGatherRewardVideoAdClosed:(JAGAdRewardVideo *)rewardVideo;

/// 激励视屏视频播放完成
- (void)JAGatherRewardVideoAdPlayFinish:(JAGAdRewardVideo *)rewardVideo;

/// 激励视屏视频播放失败
- (void)JAGatherRewardVideoAdPlayFailed:(JAGAdRewardVideo *)rewardVideo error:(NSError *)error;;

/// 激励视屏到达激励时间
- (void)JAGatherAdRewardVideoAdDidRewardEffective:(JAGAdRewardVideo *)rewardVideo;

@end

@interface JAGAdRewardVideo : JAGAdBaseAdapter

@property (nonatomic, weak) id<JAGAdRewardVideoDelegate> delegate;

/// 初始化激励视屏广告
/// @param placementID 广告位
- (instancetype)initWithPlacementID:(NSString*)placementID;

/// 广告是否有效
- (BOOL)isValid;

@end

NS_ASSUME_NONNULL_END
